import request from '../../utils/request';

export const fetchData = (query) => {
    return request({
        url: '/sys/user/list',
        method: 'post',
        data: query
    })
}

export const getCurrentUser = (query) => {
    return request({
        url: '/sys/user/getCurrentUser',
        method: 'post',
        data: query
    })
}

export const login = (query) => {
    return request({
        url: '/sys/user/login',
        method: 'post',
        data: query
    })
}

export const getMenus = (query) => {
    return request({
        url: '/sys/user/getMenus',
        method: 'post',
        data: query
    })
}


export const saveUser = (query) => {
    return request({
        url: '/sys/user/save',
        method: 'post',
        data: query
    })
}

export const updateUser = (query) => {
    return request({
        url: '/sys/user/update',
        method: 'post',
        data: query
    })
}

export const getUserRole = (query) => {
    return request({
        url: '/sys/user/getUserRole',
        method: 'post',
        data: query
    })
}

export const deleteUser = (query)=>{
    return request({
        url: '/sys/user/delete',
        method: 'post',
        data: query
    })
}

export const getUserButtonMenus = (query) => {
    return request({
        url: '/sys/user/getUserButtonMenus',
        method: 'post',
        data: query
    })
}

export const resetPassword = (query) =>{
    return request({
        url: '/sys/user/reset',
        method: 'post',
        data: query
    })
}
